﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Windows.Threading;

using MetaVideoEditorEvolved.Engine;
using MetaVideoEditorEvolved.Helper;

namespace MetaVideoEditorEvolved
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
		protected override void OnStartup(StartupEventArgs e)
		{
			base.OnStartup(e);
			
			this.DispatcherUnhandledException+= new DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
		}
		
    	static App()
    	{    		
    		GalaSoft.MvvmLight.Threading.DispatcherHelper.Initialize();
    	}

    	static void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
    	
    	{
    		Tracer.TracerInstance.TraceError("Error in mvve", e.Exception);
    		Application.Current.Shutdown();
    	}
    	
    	
    }
}
